package net.atomtree.corrsepond;

/**
 * Created by czk on 2016/1/5.
 * 这个类会按照你放入的对象返回你需要的url
 */
public class CorrespondStrategy {
    public Correspond correspond;

    public CorrespondStrategy(Correspond correspond) {
        this.correspond = correspond;
    }

    public String doCorrespond(String jobId) throws Exception {
        return correspond.getCorrespondUrl(jobId);
    }

    public static void main(String[] args) throws Exception {
        CorrespondStrategy correspondStrategy=new CorrespondStrategy(new ApplicationCorrespondImpl());
        String url=correspondStrategy.doCorrespond("app-20160105161209-0000  ");
        System.out.printf(url);
    }
}
